// 后端返回的字典数据接口(比如省市区等等)
import request from '@/utils/request'

//影片管理搜索接口
export function getMovieQuery(data) {
  return request({
    url: '/film/collection/query_list',
    method: 'post',
    data,
  })
}
//影片管理添加接口
export function addMovieForm(data) {
  return request({
    url: '/film/collection/add_item',
    method: 'post',
    data,
  })
}

//影片管理编辑接口
export function editMovieForm(data) {
  return request({
    url: '/film/collection/edit_item',
    method: 'post',
    data,
  })
}

//影片管理删除接口
export function delMovieForm(id) {
  return request({
    url: '/film/collection/del_item',
    method: 'post',
    data: {
      id,
    },
  })
}
//影片分类搜索接口
export function getMovieTypeQuery(data) {
  return request({
    url: '/film/category/query_list',
    method: 'post',
    data,
  })
}
//影片分类添加接口
export function addMovieTypeForm(data) {
  return request({
    url: '/film/category/add_item',
    method: 'post',
    data,
  })
}

//影片分类编辑接口
export function editMovieTypeForm(data) {
  return request({
    url: '/film/category/edit_item',
    method: 'post',
    data,
  })
}

//影片分类删除接口
export function delMovieTypeForm(id) {
  return request({
    url: '/film/category/del_item',
    method: 'post',
    data: {
      id,
    },
  })
}

//影片子集搜索接口
export function handleMovieChil(data) {
  return request({
    url: '/film/episodes/query_list',
    method: 'post',
    data,
  })
}
//影片子集增加接口
export function addMovieChil(data) {
  return request({
    url: '/film/episodes/add_item',
    method: 'post',
    data,
  })
}
//影片子集编辑接口
export function editMovieChil(data) {
  return request({
    url: '/film/episodes/edit_item',
    method: 'post',
    data,
  })
}
//影片子集删除接口
export function delMovieChil(id) {
  return request({
    url: '/film/episodes/del_item',
    method: 'post',
    data: {
      id,
    },
  })
}

//批量导入影片接口
export function inportMovies(file) {
  return request({
    url: '/film/collection/add_itemBatch',
    method: 'post',
    data: {
      file,
    },
  })
}

//批量修改价格接口
export function editMoviesCoins(data) {
  return request({
    url: '/film/episodes/edit_itemBatch',
    method: 'post',
    data,
  })
}
